package com.ruoyi.spot.realtime.transactionrecord.service.impl;

import java.util.List;

import com.ruoyi.spot.realtime.transactionrecord.domain.VO.SpotTransactionRecordRealtimeDataVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.spot.realtime.transactionrecord.mapper.SpotTransactionRecordRealtimeDataMapper;
import com.ruoyi.spot.realtime.transactionrecord.domain.SpotTransactionRecordRealtimeData;
import com.ruoyi.spot.realtime.transactionrecord.service.ISpotTransactionRecordRealtimeDataService;

/**
 * 实时获取成交记录Service业务层处理
 * 
 * @author saumell
 * @date 2024-08-07
 */
@Service
public class SpotTransactionRecordRealtimeDataServiceImpl implements ISpotTransactionRecordRealtimeDataService 
{
    @Autowired
    private SpotTransactionRecordRealtimeDataMapper spotTransactionRecordRealtimeDataMapper;

    /**
     * 查询实时获取成交记录
     * 
     * @param id 实时获取成交记录主键
     * @return 实时获取成交记录
     */
    @Override
    public SpotTransactionRecordRealtimeDataVO selectSpotTransactionRecordRealtimeDataById(Integer id)
    {
        return spotTransactionRecordRealtimeDataMapper.selectSpotTransactionRecordRealtimeDataById(id);
    }

    /**
     * 查询实时获取成交记录列表
     * 
     * @param spotTransactionRecordRealtimeData 实时获取成交记录
     * @return 实时获取成交记录
     */
    @Override
    public List<SpotTransactionRecordRealtimeDataVO> selectSpotTransactionRecordRealtimeDataList(SpotTransactionRecordRealtimeDataVO spotTransactionRecordRealtimeData)
    {
        return spotTransactionRecordRealtimeDataMapper.selectSpotTransactionRecordRealtimeDataList(spotTransactionRecordRealtimeData);
    }

    /**
     * 新增实时获取成交记录
     * 
     * @param spotTransactionRecordRealtimeData 实时获取成交记录
     * @return 结果
     */
    @Override
    public int insertSpotTransactionRecordRealtimeData(SpotTransactionRecordRealtimeData spotTransactionRecordRealtimeData)
    {
        return spotTransactionRecordRealtimeDataMapper.insertSpotTransactionRecordRealtimeData(spotTransactionRecordRealtimeData);
    }

    /**
     * 修改实时获取成交记录
     * 
     * @param spotTransactionRecordRealtimeData 实时获取成交记录
     * @return 结果
     */
    @Override
    public int updateSpotTransactionRecordRealtimeData(SpotTransactionRecordRealtimeData spotTransactionRecordRealtimeData)
    {
        return spotTransactionRecordRealtimeDataMapper.updateSpotTransactionRecordRealtimeData(spotTransactionRecordRealtimeData);
    }

    /**
     * 批量删除实时获取成交记录
     * 
     * @param ids 需要删除的实时获取成交记录主键
     * @return 结果
     */
    @Override
    public int deleteSpotTransactionRecordRealtimeDataByIds(Integer[] ids)
    {
        return spotTransactionRecordRealtimeDataMapper.deleteSpotTransactionRecordRealtimeDataByIds(ids);
    }

    /**
     * 删除实时获取成交记录信息
     * 
     * @param id 实时获取成交记录主键
     * @return 结果
     */
    @Override
    public int deleteSpotTransactionRecordRealtimeDataById(Integer id)
    {
        return spotTransactionRecordRealtimeDataMapper.deleteSpotTransactionRecordRealtimeDataById(id);
    }

    @Override
    public List<SpotTransactionRecordRealtimeDataVO> selectSpotAllData() {
        return spotTransactionRecordRealtimeDataMapper.selectSpotAllData();
    }

    @Override
    public Integer queryCurryNumber(String currencyPair) {
        return spotTransactionRecordRealtimeDataMapper.queryCurryNumber(currencyPair);
    }
}
